package book_management.user.operation.impl;

import book_management.user.book.Book;
import book_management.user.book.BookList;
import book_management.user.operation.IOperation;

public class RemoveOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("您正在进行的是删除书籍的操作");
        System.out.println("请输入您要删除的书籍名称");
        String booksName=scanner.next();
        if(bookList.isContains(booksName)){
            bookList.bookRemove(booksName);
            System.out.println("书籍删除成功");
        }else{
            System.out.println("书架上不存在该书");
        }
    }
}
